<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>X5</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.2.0.css"/>
    <link rel="stylesheet" type="text/css" href="../css/aui_skin_night.css"/>
    <link rel="stylesheet" type="text/css" href="../css/common.css"/>

    <style>
        .display-block {
            display: block;
        }

        .display-none {
            display: none;
        }

        .icon-svip {
            width: 20px;
            margin: -10px 10px 0 0;

            content: '';
            background: url() no-repeat;

            height: 20px;
            background-size: contain;
            display: inline-block;
            vertical-align: middle;

        }

        .cart {
            z-index: 18;
            bottom: 0;
            height: 50px;
            width: 100%;
            background: #3c3c3c;
        }

        .loca, aside, .cart, .sele {
            position: fixed;
            left: 0;
            z-index: 9;
        }

        .cart .r {
            float: right;
            width: 36%;
            background: #5c5c5c;
            text-align: center;
            color: #FFF;
            font-size: 12px;
        }

        .cart .r_ok {
            float: right;
            width: 36%;
            background: #1b7dff;
            text-align: center;
            color: #FFF;
            font-size: 15px;
        }

        .cart > div {
            line-height: 50px;
            font-size: 16px;
            color: #fff;
        }

        a, a:hover, a:active, a:focus {
            text-decoration: none;
        }

        .cart .l {
            /*    width: 42%;  */
            position: relative;
            padding-left: 15%;
        }

        .cart .cartnum {
            position: absolute;
            display: inline-block;
            font-style: normal;
            background: #ff0000;
            font-size: 12px;
            height: 16px;
            left: 50px;
            top: 4px;
            color: #ffffff;
            border-radius: 10px;
            padding: 1px 6px;
            z-index: 2;
            line-height: 16px;
        }

        .cart img {
            position: absolute;
            padding: 5px;
            height: 35px;
            background: #3c3c3c;
            z-index: 1;
            left: 10px;
            top: 5px;
        }


    </style>

</head>
<body>
<!--<header class="aui-bar aui-bar-nav fix-statusbar">-->
    <!--<a class="aui-pull-left" onclick="GoBack()" style="color: #c4c4c4;font-size: 15px">-->
        <!--< 返回-->
    <!--</a>-->
    <!--<div class="aui-title" id="title" style="font-size: 15px;"><i class="icon-svip"></i> 平台浏览</div>-->
    <!--&lt;!&ndash;<a id="GoPlay" class="display-none " onclick="PlayButtonNav()">&ndash;&gt;-->
        <!--&lt;!&ndash;<span style=" color: #d29039; font-size:10px;margin-right: 5px;" id="GoPlayText"> 选线播放 </span> <span&ndash;&gt;-->
            <!--&lt;!&ndash;class="aui-iconfont aui-icon-video" style=" color: #d29039; font-weight: bold;"></span>&ndash;&gt;-->
    <!--&lt;!&ndash;</a>&ndash;&gt;-->
    <!--&lt;!&ndash;<a class="aui-pull-right" onclick="GoPageWork('Gear')">&ndash;&gt;-->
        <!--&lt;!&ndash;<span class="aui-iconfont aui-icon-gear">55</span>&ndash;&gt;-->
    <!--&lt;!&ndash;</a>&ndash;&gt;-->
    <!--<a class="aui-pull-right" onclick="GoPageWork('Close')">-->
        <!--<span  style="color: #c4c4c4;font-size: 15px">关闭</span>-->
    <!--</a>-->
<!--</header>-->
<header class="aui-bar aui-bar-nav fix-statusbar">
    <a class="aui-pull-left" onclick="GoBack()">
        返回
    </a>

    <a class="aui-pull-left" onclick="GoPageWork('Refresh')">
        <!--<span class="aui-iconfont aui-icon-refresh"></span>-->
    </a>

    <a class="aui-pull-left" onclick="GoPageWork('Close')">
        <!--<span class="aui-iconfont aui-icon-close"></span>-->
    </a>

    <div class="aui-title" id="title" style="font-size: 15px;"> <i class="icon-svip"></i> 影视特权  </div>

    <a id="GoPlay" class="display-none " onclick="PlayButtonNav()">
        <!--<span style=" color: #d29039; font-size:10px;margin-right: 5px;"  id="GoPlayText"> 选线播放 </span> <span class="aui-iconfont aui-icon-video" style=" color: #d29039; font-weight: bold;"></span>-->
    </a>


    <a class="aui-pull-right" onclick="GoPageWork('Close')">
        关闭
    </a>
</header>

<div class="cart ng-scope" id="bottom_button_click">
    <div class="r" id="bottom_button_status">正在等待资源</div>
    <div class="l ng-binding">
        <label id="type_title" style="font-size: 12px;">VIP 连接中 ···</label>
    </div>
    <a><img src="" alt="..."></a>
</div>


</body>
<script type="text/javascript" src="../js/zepto.js"></script>
<script type="text/javascript" src="../js/api.js"></script>
<script type="text/javascript">

    var browser;
    var play_url = '';
    var play_title = '';


    apiready = function () {
        //	alert(JSON.stringify(localStorage.getItem('jx_Interface_one') ));
        //系统返回键是否绑定
        if (localStorage.getItem('SystemReturnKeyBinding') == 1) {
            api.addEventListener({
                name: 'keyback'
            }, function (ret, err) {

                GoBack();

            });
        }


        browser = api.require('webBrowser');


// alert( JSON.stringify( api.pageParam.url ) );

        var headerHeight = $('header').height();

        console.log("url:" + api.pageParam.url);


        browser.openView({
            url: api.pageParam.url,
            //  url:'https://tool.lu/useragent',
            progress: {
                color: "#000",	//加载进度条颜色，支持 rgb，rgba，#fff等，默认值#45C01A
                height: 1		 //进度条高度，默认值3，数字类型
            },
            rect: {
                x: 0,
                y: headerHeight,
                w: 'auto',
                h: api.winHeight - headerHeight - 50
            }
        }, function (ret, err) {


            //	alert( JSON.stringify( array1 ) );


            //		console.log("9900##" + JSON.stringify(ret));

            //  alert( JSON.stringify( ret ) );

            switch (ret.state) {
                case 0:		//0-开始加载；
                    console.log('state  为 0  开始加载！ 当前URL:' + ret.url);
                    //链接处理
                    if (ret.url.indexOf("v.qq.com") != -1) {
                        //底部按钮 来源名称
                        BottomButtonShowName('Tencent');
                        //头部按钮
                        PlayButtonShow(9);
                        BottomButtonShow(1);
                        var ago_key = localStorage.getItem('tx_play_decide');
                        var end_key = U.signature(ago_key);
                        alert(1);
                        alert(ago_key);
                        alert(2);
                        alert(end_key);
                        console.log(' base64Decode: ' + end_key);
                        decode_key = end_key.split(',');
                        for (var i = 0; i < decode_key.length; i++) {
                            if (ret.url.indexOf(decode_key[i]) != -1) {

                                //		 alert( JSON.stringify( '命中' ) );
                                //底部按钮
                                play_url = ret.url;
                                BottomButtonShow(1, ret.url);
                                break;
                            } else {
                                //头部按钮
                                PlayButtonShow(1);
                                //底部按钮
                                BottomButtonShow(1);

                            }
                        }
                    } else if (ret.url.indexOf("m.iqiyi.com") != -1) {

                        //底部按钮 来源名称
                        BottomButtonShowName('iQIYI');
                        //var ago_key = localStorage.getItem('iqy_play_decide');
                        var end_key = "v_";
                        console.log(' base64Decode: ' + end_key);
                        decode_key = end_key.split(',');
                        for (var i = 0; i < decode_key.length; i++) {
                            if (ret.url.indexOf(decode_key[i]) != -1) {
                                //头部按钮
                                PlayButtonShow(1);
                                //底部按钮
                                play_url = ret.url;
                                BottomButtonShow(1, ret.url);

                                break;
                            } else {
                                //头部按钮
                                PlayButtonShow(0);
                                //底部按钮
                                BottomButtonShow(0);
                            }
                        }
                    } else if (ret.url.indexOf("pptv.com") != -1) {

                        //底部按钮 来源名称
                        BottomButtonShowName('PPTV');
                        var ago_key = localStorage.getItem('pptv_play_decide');
                        var end_key = U.signature(ago_key);
                        alert(1);
                        alert(ago_key);
                        alert(2);
                        alert(end_key);
                        console.log(' base64Decode: ' + end_key);
                        decode_key = end_key.split(',');
                        for (var i = 0; i < decode_key.length; i++) {
                            if (ret.url.indexOf(decode_key[i]) != -1) {

                                //头部按钮
                                PlayButtonShow(1);
                                //底部按钮
                                play_url = ret.url;
                                BottomButtonShow(1, ret.url);

                                break;
                            } else {
                                //头部按钮
                                PlayButtonShow(0);
                                //底部按钮
                                BottomButtonShow(0);


                            }
                        }

                    } else if (ret.url.indexOf("youku.com") != -1) {

                        //底部按钮 来源名称
                        BottomButtonShowName('YOUKU');
                        var ago_key = localStorage.getItem('yk_play_decide');
                        var end_key = U.signature(ago_key);
                        alert(1);
                        alert(ago_key);
                        alert(2);
                        alert(end_key);
                        console.log(' base64Decode: ' + end_key);
                        decode_key = end_key.split(',');
                        for (var i = 0; i < decode_key.length; i++) {
                            if (ret.url.indexOf(decode_key[i]) != -1) {

                                //头部按钮
                                PlayButtonShow(1);
                                //底部按钮
                                play_url = ret.url;
                                BottomButtonShow(1, ret.url);

                                break;
                            } else {
                                //头部按钮
                                PlayButtonShow(0);
                                //底部按钮
                                BottomButtonShow(0);


                            }
                        }

                    } else if (ret.url.indexOf("m.fun.tv") != -1) {

                        //底部按钮 来源名称
                        BottomButtonShowName('FUNTV');

                        var ago_key = localStorage.getItem('fx_play_decide');
                        var end_key = U.signature(ago_key);
                        alert(1);
                        alert(ago_key);
                        alert(2);
                        alert(end_key);
                        console.log(' base64Decode: ' + end_key);
                        decode_key = end_key.split(',');
                        for (var i = 0; i < decode_key.length; i++) {
                            if (ret.url.indexOf(decode_key[i]) != -1) {

                                //头部按钮
                                PlayButtonShow(1);
                                //底部按钮
                                play_url = ret.url;
                                BottomButtonShow(1, ret.url);

                                break;
                            } else {
                                //头部按钮
                                PlayButtonShow(0);
                                //底部按钮
                                BottomButtonShow(0);


                            }
                        }

                    } else if (ret.url.indexOf("1905.com") != -1) {

                        //底部按钮 来源名称
                        BottomButtonShowName('1905');

                        var ago_key = localStorage.getItem('m1905_play_decide');
                        var end_key = U.signature(ago_key);
                        console.log(' base64Decode: ' + end_key);
                        alert(1);
                        alert(ago_key);
                        alert(2);
                        alert(end_key);
                        decode_key = end_key.split(',');
                        for (var i = 0; i < decode_key.length; i++) {
                            if (ret.url.indexOf(decode_key[i]) != -1) {

                                //头部按钮
                                PlayButtonShow(1);
                                //底部按钮
                                play_url = ret.url;
                                BottomButtonShow(1, ret.url);

                                break;
                            } else {
                                //头部按钮
                                PlayButtonShow(0);
                                //底部按钮
                                BottomButtonShow(0);


                            }
                        }

                    } else if (ret.url.indexOf("miguvideo.com") != -1) {

                        //底部按钮 来源名称
                        BottomButtonShowName('MIGU');

                        var ago_key = localStorage.getItem('migu_play_decide');
                        //var end_key = U.signature(ago_key);
                        var end_key = "/detail";
                        console.log(' base64Decode: ' + end_key);
                        decode_key = end_key.split(',');
                        for (var i = 0; i < decode_key.length; i++) {
                            if (ret.url.indexOf(decode_key[i]) != -1) {

                                //头部按钮
                                PlayButtonShow(1);
                                //底部按钮
                                play_url = ret.url;
                                BottomButtonShow(1, ret.url);

                                break;
                            } else {
                                //头部按钮
                                PlayButtonShow(0);
                                //底部按钮
                                BottomButtonShow(0);


                            }
                        }

                    } else if (ret.url.indexOf("sohu.com") != -1) {

                        //底部按钮 来源名称
                        BottomButtonShowName('SOHU');

                        var ago_key = localStorage.getItem('sohu_play_decide');
                        var end_key = U.signature(ago_key);
                        alert(1);
                        alert(ago_key);
                        alert(2);
                        alert(end_key);
                        console.log(' base64Decode: ' + end_key);
                        decode_key = end_key.split(',');
                        for (var i = 0; i < decode_key.length; i++) {
                            if (ret.url.indexOf(decode_key[i]) != -1) {

                                //头部按钮
                                PlayButtonShow(1);
                                //底部按钮
                                play_url = ret.url;
                                BottomButtonShow(1, ret.url);

                                break;
                            } else {
                                //头部按钮
                                PlayButtonShow(0);
                                //底部按钮
                                BottomButtonShow(0);


                            }
                        }

                    }


                    /*
                    else if(ret.url.indexOf("m.le.com")!= -1){

                        var ago_key = localStorage.getItem('leshi_play_decide');
                        var end_key = 	U.signature(ago_key);
                        console.log(' base64Decode: '+end_key);
                        decode_key = end_key.split(',');
                        for (var i =0; i < decode_key.length; i++ ){
                                    if(ret.url.indexOf( decode_key[i]  )!= -1){
                            ///							play_url = ret.url;
                                    //	GoPlay(ret.url);
                                         U.OpenVideoJxPopup(ret.url);
                                        PlayButtonShow(1);
                                        break;
                                    }else{
                                        PlayButtonShow(0);
                                    }
                        }


                    }


                    */

                    /*
                    // pptv
                     if(ret.url.indexOf("pptv.com")!= -1){

                                        var ago_key = localStorage.getItem('pptv_play_decide');
                                        var end_key = 	U.signature(ago_key);
                                        console.log(' base64Decode: '+end_key);
                                        decode_key = end_key.split(',');
                                        for (var i =0; i < decode_key.length; i++ ){
                                                    if(ret.url.indexOf( decode_key[i]  )!= -1){

                                play_url = ret.url;
                                U.setStorage('Play_url',ret.url);					// 当前页面地址

                                                    }
                                        }

                     }else  if(ret.url.indexOf("m.iqiyi.com")!= -1){

                                         var ago_key = localStorage.getItem('iqy_play_decide');
                                         var end_key = 	U.signature(ago_key);
                                         console.log(' base64Decode: '+end_key);
                                         decode_key = end_key.split(',');

                                         for (var i =0; i < decode_key.length; i++ ){
                                                     if(ret.url.indexOf( decode_key[i]  )!= -1){

                                                                            alert(JSON.stringify('开始 且是iqiyi内页'+ret.url));

                                                            play_url = ret.url;
                                                            U.setStorage('Play_url',ret.url);					// 当前页面地址
                                                     }
                                         }

                                        for (var i =0; i < decode_key.length; i++ ){
                                                    if(ret.url.indexOf( decode_key[i]  )!= -1){
                            ///							play_url = ret.url;
                                                //		GoPlay(ret.url);
                                                             U.OpenVideoJxPopup(ret.url);
                                                        PlayButtonShow(1);
                                                        break;
                                                    }else{
                                                        PlayButtonShow(0);
                                                    }
                                        }



                     }else if(ret.url.indexOf("youku.com")!= -1){

                         var ago_key = localStorage.getItem('yk_play_decide');
                         var end_key = 	U.signature(ago_key);
                         console.log(' base64Decode: '+end_key);
                         decode_key = end_key.split(',');
                         for (var i =0; i < decode_key.length; i++ ){
                                     if(ret.url.indexOf( decode_key[i]  )!= -1){
                                            play_url = ret.url;
                                            U.setStorage('Play_url',ret.url);					// 当前页面地址
                                     }
                         }

                     }else if(ret.url.indexOf("m.fun.tv")!= -1){

                         var ago_key = localStorage.getItem('fx_play_decide');
                         var end_key = 	U.signature(ago_key);
                         console.log(' base64Decode: '+end_key);
                         decode_key = end_key.split(',');
                         for (var i =0; i < decode_key.length; i++ ){
                                     if(ret.url.indexOf( decode_key[i]  )!= -1){
                                            play_url = ret.url;
                                            U.setStorage('Play_url',ret.url);					// 当前页面地址
                                     }
                         }

                     }else if(ret.url.indexOf("1905.com")!= -1){

                         var ago_key = localStorage.getItem('m1905_play_decide');
                         var end_key = 	U.signature(ago_key);
                         console.log(' base64Decode: '+end_key);
                         decode_key = end_key.split(',');
                         for (var i =0; i < decode_key.length; i++ ){
                                     if(ret.url.indexOf( decode_key[i]  )!= -1){
                                            play_url = ret.url;
                                            U.setStorage('Play_url',ret.url);					// 当前页面地址
                                     }
                         }

                     }else if(ret.url.indexOf("miguvideo.com")!= -1){

                         var ago_key = localStorage.getItem('migu_play_decide');
                         var end_key = 	U.signature(ago_key);
                         console.log(' base64Decode: '+end_key);
                         decode_key = end_key.split(',');
                         for (var i =0; i < decode_key.length; i++ ){
                                     if(ret.url.indexOf( decode_key[i]  )!= -1){
                                            play_url = ret.url;
                                            U.setStorage('Play_url',ret.url);					// 当前页面地址
                                     }
                         }

                     }else if(ret.url.indexOf("v.qq.com")!= -1){

                         var ago_key = localStorage.getItem('tx_play_decide');
                         var end_key = 	U.signature(ago_key);
                         console.log(' base64Decode: '+end_key);
                         decode_key = end_key.split(',');
                         for (var i =0; i < decode_key.length; i++ ){
                                     if(ret.url.indexOf( decode_key[i]  )!= -1){
                                            play_url = ret.url;
                                            U.setStorage('Play_url',ret.url);					// 当前页面地址
                                     }
                         }

                     }else if(ret.url.indexOf("sohu.com")!= -1){

                         var ago_key = localStorage.getItem('sohu_play_decide');
                         var end_key = 	U.signature(ago_key);
                         console.log(' base64Decode: '+end_key);
                         decode_key = end_key.split(',');
                         for (var i =0; i < decode_key.length; i++ ){
                                     if(ret.url.indexOf( decode_key[i]  )!= -1){
                                            play_url = ret.url;
                                            U.setStorage('Play_url',ret.url);					// 当前页面地址
                                     }
                         }

                     }else if(ret.url.indexOf("m.le.com")!= -1){

                         var ago_key = localStorage.getItem('leshi_play_decide');
                         var end_key = 	U.signature(ago_key);
                         console.log(' base64Decode: '+end_key);
                         decode_key = end_key.split(',');
                         for (var i =0; i < decode_key.length; i++ ){
                                     if(ret.url.indexOf( decode_key[i]  )!= -1){
                                            play_url = ret.url;
                                            U.setStorage('Play_url',ret.url);					// 当前页面地址
                                     }
                         }


                     }else if(ret.url.indexOf("m.mgtv.com")!= -1){

                         var ago_key = localStorage.getItem('mg_play_decide');
                         var end_key = 	U.signature(ago_key);
                         console.log(' base64Decode: '+end_key);
                         decode_key = end_key.split(',');
                         for (var i =0; i < decode_key.length; i++ ){
                                     if(ret.url.indexOf( decode_key[i]  )!= -1){
                                            play_url = ret.url;
                                            U.setStorage('Play_url',ret.url);					// 当前页面地址
                                     }
                         }


                     }
*/

                    break;
                case 1:		//1-加载进度发生变化；
                    break;
                case 2:		//2-结束加载；
                    console.log('state  为 2  结束加载！ 当前URL:' + ret.url);


                    //	  alert( JSON.stringify( '加载完毕' ) );
                    //dataurl = ret.url;
                    //  dataurl2 = dataurl;
                    //        var url = $api.byId('newurl');
                    //        newurl.innerHTML = '<i class="iconfont icon-svip"></i>'+ret.url;
                    break;


                case 3:		//3-title发生变化
                    console.log('state  为 3  title发生变化！ 当前title:' + ret.title);
                    title.innerHTML = '<i class="icon-svip"></i>' + ret.title;
                    U.setStorage('Play_title', ret.title);
                    //    console.log('title发生变化:'+ret.title+play_url);


                    //		if(ret.title.indexOf("频道")!= -1 || ret.title.indexOf("返回")!= -1){

                    //		}else{

                    //      GetInfoAgoTitle = U.GetInfoAgo(play_url,ret.title);
                    //      play_title = GetInfoAgoTitle[0];
                    //      title.innerHTML = '<i class="icon-svip"></i>'+play_title;
                    //      U.setStorage('Play_title',play_title);					// 当前页面Title


                    //			}


                    break;
                case 4:		//4-url发生变化
                    console.log('state  为 4  url发生变化！ 当前url:' + ret.url);
                    /*
                                                                                    if(ret.url.indexOf("getcookie")!= -1){

                                                                                        console.log('腾讯的getcookie  ！ 当前url:'+play_url );
                                                                                        BottomButtonShow(1,play_url);
                                                                                        PlayButtonShow(1);


                                                                                    }

                    */
                    if (ret.url.indexOf("m.mgtv.com") != -1) {

                        //底部按钮 来源名称
                        BottomButtonShowName('MGTV');

                        var ago_key = localStorage.getItem('mg_play_decide');
                        var end_key = U.signature(ago_key);
                        console.log(' base64Decode: ' + end_key);
                        decode_key = end_key.split(',');
                        for (var i = 0; i < decode_key.length; i++) {
                            if (ret.url.indexOf(decode_key[i]) != -1) {

                                //头部按钮
                                PlayButtonShow(1);
                                //底部按钮
                                play_url = ret.url;
                                BottomButtonShow(1, ret.url);

                                break;
                            } else {
                                //头部按钮
                                PlayButtonShow(0);
                                //底部按钮
                                BottomButtonShow(0);

                            }
                        }
                    }
                    // alert( JSON.stringify( ret.url ) );

                    /*

                                                         if(ret.url.indexOf("m.iqiyi.com")!= -1){

                                                                             var ago_key = localStorage.getItem('iqy_play_decide');
                                                                             var end_key = 	U.signature(ago_key);
                                                                             console.log(' base64Decode: '+end_key);
                                                                             decode_key = end_key.split(',');
                                                                             for (var i =0; i < decode_key.length; i++ ){
                                                                                         if(ret.url.indexOf( decode_key[i]  )!= -1){
                                                                                         play_url = ret.url;
                                                                                     //		GoPlay(ret.url);
                                                                                             //	alert(JSON.stringify('加载结束 且是iqiyi内页'+ret.url));
                                                                                             setTimeout(function(){		//延迟执行
                                                                                                     U.OpenVideoJxPopup(ret.url);
                                                                                             }, 300);

                                                                                             PlayButtonShow(1);
                                                                                             break;
                                                                                         }else{
                                                                                             PlayButtonShow(0);
                                                                                         }
                                                                             }

                                                         }

                    */


                    //        play_url = ret.url;


                    //跳APP
                    /*
          if(ret.url.indexOf("iqiyi.com/app/register_business")!= -1){

              GoPageWork('Back');

              U.RyanUp(2,play_title+' 暂时无法播放');


              api.sendEvent({
                          name: 'CloseRyanUp',
                          extra: {}
              });


          }else if(ret.url.indexOf("getcookie")!= -1){



          }else{

//              U.setStorage('Play_url',ret.url);					// 当前页面地址


          }
*/


                    break;
                default:
                    break;
            }


            //  alert( JSON.stringify( play_url ) );

        });


    }


    //播放按钮 显示
    function PlayButtonShow(type) {

        if (type == 1) {

            var obj = document.getElementById("GoPlay");
            obj.setAttribute("class", 'aui-pull-right display-block');

        } else if (type == 9) {

            var obj = document.getElementById("GoPlay");
            obj.setAttribute("class", 'aui-pull-right display-block');

            var obj = document.getElementById("GoPlay");
            //	obj.setAttribute("onclick", "GoBottomButtonPlay(1);");
            obj.setAttribute("onclick", "GoPageWork('Refresh');");

            GoPlayText.innerHTML = ' 获取资源';
        } else {

            var obj = document.getElementById("GoPlay");
            obj.setAttribute("class", 'display-none');
        }

    }

    //导航播放按钮点击
    function PlayButtonNav() {


        console.log("导航播放按钮点击url:" + play_url);

        //	GetInfoAgoTitle = U.GetInfoAgo(play_url,play_title);
        //	play_title = GetInfoAgoTitle[0];


        //	U.PlayTips(1,play_title,play_url);
        browser.loadScript({
            script: 'location.reload();'
        });

        U.OpenVideoJxPopup(play_url);

    }


    //连接状态 NAME 底部 显示
    function BottomButtonShowName(name) {
        //	if(name == 'Tencent'){
        //							type_title.innerHTML = ' 请先点击右上角获取资源！';
        //		}else{

        type_title.innerHTML = name + ' VIP 已连接成功！';
        //		}

    }

    //播放按钮  底部 显示
    function BottomButtonShow(type) {

        if (type == 1) {
            //底部
            var obj = document.getElementById("bottom_button_status");
            obj.setAttribute("class", 'r_ok');

            var obj = document.getElementById("bottom_button_click");
            //	obj.setAttribute("onclick", "GoBottomButtonPlay(1);");
            obj.setAttribute("onclick", 'GoBottomButtonPlay(1);');

            bottom_button_status.innerHTML = '开始播放';

        } else {
            //底部
            var obj = document.getElementById("bottom_button_status");
            obj.setAttribute("class", 'r');

            var obj = document.getElementById("bottom_button_click");
            obj.setAttribute("onclick", 'GoBottomButtonPlay(0);');

            bottom_button_status.innerHTML = '正在等待资源';

        }

    }


    //底部按钮点击
    function GoBottomButtonPlay(type) {
        //	alert(JSON.stringify(play_url));
        if (type == 1) {
            GoPageWork('Refresh');
            U.toast('爱看影视VIP资源加载中 请稍等···');
            setTimeout(function () {		//延迟执行
                if (localStorage.getItem('jx_url2') != null || localStorage.getItem('jx_url2') != '' || localStorage.getItem('jx_url2') != 'undefined') {
                    var Composite_Url = localStorage.getItem('jx_url2') + play_url;
                    //alert(JSON.stringify('1 可以播放 组合地址： '+ Composite_Url ));
                    console.log(' 接口一不为空 当前组合地址: ' + Composite_Url);
                    console.log(' 准备提交播放');

                    //		U.openWin('video/', 'videos_play_jiexi',{url:Composite_Url,beginurl:play_url,title:play_title,cutlineNmae:'当前:默认线路'},'');
                    api.openWin({
                        // name: 'x5_pay',
                        // url: './webx5_jx_play.html',
                        // slidBackEnabled: false,
                        // pageParam: {
                        //     video_name: localStorage.getItem('Play_title'),
                        //     url: Composite_Url,
                        //     primary_url: play_url,
                        //     title: '默认线路'
                        // }

                        name: 'play_win',
                        url: './play_win.html',
                        delay: 300,
                        pageParam: {
                            url: Composite_Url,
                            srcUrl: play_url,
                            title: "默认线路",
                            needRecordHistory: true
                        },
                        //pageParam:{url:dataurl2},
                        bgColor: '#000000'

                    });
                }
            }, 1000);


        } else {
            U.toast('当前页面找不到可播放资源');
        }

    }


    //开始播放 （弹窗提示）
    function GoPlay(url) {
        // alert(JSON.stringify(play_title));
        // U.openWin('video/', 'videos_play_jiexi',{url:play_url,title:play_title});
        U.PlayTips(1, play_title, url);

    }


    //返回处理
    function GoBack() {

        if (localStorage.getItem('WebReturnLogic') == 1) {
            GoPageWork('Back')
        } else {
            GoPageWork('Close')
        }

    }


    //页面处理
    function GoPageWork(name) {

        if (name == 'Back') {

            browser.historyBack(
                function (ret, err) {
                    if (!ret.status) {
                        api.closeWin();
                    }
                }
            );

        } else if (name == 'Close') {

            api.closeWin();


        } else if (name == 'Refresh') {

            browser.loadScript({
                script: 'location.reload();'
            });

        } else if (name == 'Gear') {

            U.openWin('my/', 'setlist');

        }


    }

</script>
</html>
